/**
 *@desc    路由拦截配置
 *@author  yhy
 *@date    2019/02/20
 */
import Vue from 'vue'
import Router from 'vue-router'
import allRouter from '@/router/routerConfig.js'

Vue.use(Router)

let router = new Router({
  routes: [...allRouter],
  scrollBehavior (to, from, savedPosition) {
    return { x: 0, y: 0 }
  }
})

// 全局前置钩子函数
router.beforeEach((to, from, next) => {
  next()
})

// 全局后置钩子函数
router.afterEach((to, from) => {})

export default router
